package cate.common.table.activity.battleroyale.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.table.d.GDPosition;

public class BattleRoyaleLevelRow extends ERow {
    public int level;

    public int chapter;

    public String instanceConfig;

    public String instanceConfig2;

    public String instanceConfig3;

    public String rewardStr;

    public int group;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("ID");
        this.level = xrw.getInteger("关卡");
        this.chapter = xrw.getInteger("章节");
        this.instanceConfig = xrw.getString("怪物方实例");
        this.instanceConfig2 = xrw.getString("怪物方二队实例");
        this.instanceConfig3 = xrw.getString("怪物方三队实例");
        this.rewardStr = xrw.getString("通关奖励");
        this.group = xrw.getInteger("活动分组");
    }

    public String getInsCode(byte posNum) {
        switch (posNum) {
            case GDPosition.POS_ONE:
                return instanceConfig;
            case GDPosition.POS_TWO:
                return instanceConfig2;
            case GDPosition.POS_THREE:
                return instanceConfig3;
            default:
                return null;
        }
    }
}
